package cn.bdqn.service.impl;

import cn.bdqn.dao.BooksMappser;
import cn.bdqn.pojo.Books;
import cn.bdqn.service.BooksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

//注解后面不指定名称的话，它默认是类名首字母为小写
@Service("booksService")
public class BooksServiceImpl implements BooksService {

    @Autowired
    private BooksMappser booksMappser;

    @Override
    public List<Books> findAll() {
        System.out.println("业务层:查询全部数据.....");
        return booksMappser.findAll();
    }

    @Override
    public List<Books> criteriaQuery(String bookName, String bookAuthor, String bookPublish) {
        System.out.println("业务层：动态条件查询.....");
        return booksMappser.criteriaQuery(bookName,bookAuthor,bookPublish);
    }
}
